using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._Analysis
{
    /// <summary>
    /// <para>Make Location-Allocation Layer</para>
    /// <para>Makes a location-allocation network analysis layer and sets its analysis properties. A location-allocation analysis layer is useful for choosing a given number of facilities from a set of potential locations such that a demand will be allocated to facilities in an optimal and efficient manner.</para>
    /// <para>创建位置分配网络分析图层并设置其分析属性。位置分配分析图层可用于从一组潜在位置中选择给定数量的设施点，以便以最佳和高效的方式将需求分配给设施点。</para>
    /// </summary>    
    [DisplayName("Make Location-Allocation Layer")]
    public class MakeLocationAllocationLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeLocationAllocationLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_dataset">
        /// <para>Input Analysis Network</para>
        /// <para>The network dataset on which the location-allocation analysis will be performed.</para>
        /// <para>将对其执行位置分配分析的网络数据集。</para>
        /// </param>
        /// <param name="_out_network_analysis_layer">
        /// <para>Output Layer Name</para>
        /// <para>Name of the location-allocation network analysis layer to create.</para>
        /// <para>要创建的位置分配网络分析图层的名称。</para>
        /// </param>
        /// <param name="_impedance_attribute">
        /// <para>Impedance Attribute</para>
        /// <para>The cost attribute to be used as impedance in the analysis.</para>
        /// <para>在分析中用作阻抗的成本属性。</para>
        /// </param>
        public MakeLocationAllocationLayer(object _in_network_dataset, object _out_network_analysis_layer, object _impedance_attribute)
        {
            this._in_network_dataset = _in_network_dataset;
            this._out_network_analysis_layer = _out_network_analysis_layer;
            this._impedance_attribute = _impedance_attribute;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Make Location-Allocation Layer";

        public override string CallName => "na.MakeLocationAllocationLayer";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_network_dataset, _out_network_analysis_layer, _impedance_attribute, _loc_alloc_from_to.GetGPValue(), _loc_alloc_problem_type.GetGPValue(), _number_facilities_to_find, _impedance_cutoff, _impedance_transformation.GetGPValue(), _impedance_parameter, _target_market_share, _accumulate_attribute_name, _UTurn_policy.GetGPValue(), _restriction_attribute_name, _hierarchy.GetGPValue(), _output_path_shape.GetGPValue(), _default_capacity, _time_of_day, _output_layer];

        /// <summary>
        /// <para>Input Analysis Network</para>
        /// <para>The network dataset on which the location-allocation analysis will be performed.</para>
        /// <para>将对其执行位置分配分析的网络数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Analysis Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_dataset { get; set; }


        /// <summary>
        /// <para>Output Layer Name</para>
        /// <para>Name of the location-allocation network analysis layer to create.</para>
        /// <para>要创建的位置分配网络分析图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_network_analysis_layer { get; set; }


        /// <summary>
        /// <para>Impedance Attribute</para>
        /// <para>The cost attribute to be used as impedance in the analysis.</para>
        /// <para>在分析中用作阻抗的成本属性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Impedance Attribute")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _impedance_attribute { get; set; }


        /// <summary>
        /// <para>Travel From</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of travel between facilities and demand points when calculating the network costs.</para>
        ///   <bulletList>
        ///     <bullet_item>Facility to Demand—Direction of travel is from facilities to demand points. Fire departments commonly use the this setting, since they are concerned with the time it takes to travel from the fire station to the location of the emergency.</bullet_item><para/>
        ///     <bullet_item>Demand to Facility—Direction of travel is from demand points to facilities. Retail stores commonly use this setting, since they are concerned with the time it takes the shoppers to reach the store.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Using this option can affect the allocation of the demand points to the facilities on a network with one-way restrictions and different impedances based on direction of travel. For instance, a facility may be a 15-minute drive from the demand point to the facility, but only a 10-minute trip when traveling from the facility to the demand point.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在计算网络成本时指定设施点和需求点之间的行进方向。</para>
        ///   <bulletList>
        ///     <bullet_item>设施点到需求点 - 从设施点到需求点的行进方向。消防部门通常使用此设置，因为他们关心从消防局到紧急情况发生地点所需的时间。</bullet_item><para/>
        ///     <bullet_item>需求到设施点 - 行进方向是从需求点到设施点。零售商店通常使用此设置，因为他们关心购物者到达商店所需的时间。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>使用此选项可能会影响将需求点分配给网络上具有单向限制和基于行进方向的不同阻抗的设施点。例如，从需求点到设施点的行驶时间可能为 15 分钟，但从设施点到需求点的行程仅为 10 分钟。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel From")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _loc_alloc_from_to_value _loc_alloc_from_to { get; set; } = _loc_alloc_from_to_value._FACILITY_TO_DEMAND;

        public enum _loc_alloc_from_to_value
        {
            /// <summary>
            /// <para>Demand to Facility</para>
            /// <para>Demand to Facility—Direction of travel is from demand points to facilities. Retail stores commonly use this setting, since they are concerned with the time it takes the shoppers to reach the store.</para>
            /// <para>需求到设施点 - 行进方向是从需求点到设施点。零售商店通常使用此设置，因为他们关心购物者到达商店所需的时间。</para>
            /// </summary>
            [Description("Demand to Facility")]
            [GPEnumValue("DEMAND_TO_FACILITY")]
            _DEMAND_TO_FACILITY,

            /// <summary>
            /// <para>Facility to Demand</para>
            /// <para>Facility to Demand—Direction of travel is from facilities to demand points. Fire departments commonly use the this setting, since they are concerned with the time it takes to travel from the fire station to the location of the emergency.</para>
            /// <para>设施点到需求点 - 从设施点到需求点的行进方向。消防部门通常使用此设置，因为他们关心从消防局到紧急情况发生地点所需的时间。</para>
            /// </summary>
            [Description("Facility to Demand")]
            [GPEnumValue("FACILITY_TO_DEMAND")]
            _FACILITY_TO_DEMAND,

        }

        /// <summary>
        /// <para>Location-Allocation Problem Type</para>
        /// <para><xdoc>
        ///   <para>The problem type that will be solved. The choice of the problem type depends on the kind of facility being located. Different kinds of facilities have different priorities and constraints.</para>
        ///   <bulletList>
        ///     <bullet_item>Minimize impedance—This option solves the warehouse location problem. It selects a set of facilities such that the total sum of weighted impedances (demand at a location times the impedance to the closest facility) is minimized. This problem type is often known as the P-Median problem.</bullet_item><para/>
        ///     <bullet_item>Maximize coverage—This option solves the fire station location problem. It chooses facilities such that all or the greatest amount of demand is within a specified impedance cutoff.</bullet_item><para/>
        ///     <bullet_item>Maximize capacitated coverage—This option solves the location problem where facilities have a finite capacity. It chooses facilities such that all or the greatest amount of demand can be served without exceeding the capacity of any facility. In addition to honoring capacity, it selects facilities such that the total sum of weighted impedance (demand allocated to a facility multiplied by the impedance to or from the facility) is minimized.</bullet_item><para/>
        ///     <bullet_item>Minimize facilities—This option solves the fire station location problem. It chooses the minimum number of facilities needed to cover all or the greatest amount of demand within a specified impedance cutoff.</bullet_item><para/>
        ///     <bullet_item>Maximize attendance—This option solves the neighborhood store location problem where the proportion of demand allocated to the nearest chosen facility falls with increasing distance. The set of facilities that maximize the total allocated demand is chosen. Demand further than the specified impedance cutoff does not affect the chosen set of facilities.</bullet_item><para/>
        ///     <bullet_item>Maximize market share—This option solves the competitive facility location problem. It chooses facilities to maximize market share in the presence of competitive facilities. Gravity model concepts are used to determine the proportion of demand allocated to each facility. The set of facilities that maximizes the total allocated demand is chosen.</bullet_item><para/>
        ///     <bullet_item>Target market share—This option solves the competitive facility location problem. It chooses facilities to reach a specified target market share in the presence of competitive facilities. Gravity model concepts are used to determine the proportion of demand allocated to each facility. The minimum number of facilities needed to reach the specified target market share is chosen.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将要解决的问题类型。问题类型的选择取决于所定位的设施类型。不同类型的设施有不同的优先事项和限制。</para>
        ///   <bulletList>
        ///     <bullet_item>最小化阻抗 （Minimize impedance） - 此选项可解决仓库位置问题。它选择一组设施，使加权阻抗的总和（某个位置的需求乘以最近设施的阻抗）最小化。此问题类型通常称为 P-中位数问题。</bullet_item><para/>
        ///     <bullet_item>最大化覆盖范围 - 此选项可解决消防站位置问题。它选择的设施使所有或最大需求量都在指定的阻抗截止范围内。</bullet_item><para/>
        ///     <bullet_item>最大化容量覆盖范围 - 此选项可解决设施容量有限的位置问题。它选择的设施可以在不超过任何设施容量的情况下满足所有或最大需求。除了尊重容量外，它还选择设施，使加权阻抗的总和（分配给设施的需求乘以设施的阻抗乘以设施的阻抗）最小化。</bullet_item><para/>
        ///     <bullet_item>最小化设施点 - 此选项可解决消防站位置问题。它选择在指定阻抗截止范围内满足所有或最大需求所需的最小设施数量。</bullet_item><para/>
        ///     <bullet_item>最大化出勤率 - 此选项解决了邻里商店位置问题，即分配给最近所选设施点的需求比例随着距离的增加而下降。选择使总分配需求最大化的设施集。超过指定阻抗截止值的需求不会影响所选的设施组。</bullet_item><para/>
        ///     <bullet_item>最大化市场份额 - 此选项解决了竞争激烈的设施选址问题。它选择的设施是在存在竞争设施的情况下最大限度地提高市场份额。重力模型概念用于确定分配给每个设施的需求比例。选择使总分配需求最大化的设施集。</bullet_item><para/>
        ///     <bullet_item>目标市场份额 - 此选项解决了竞争性设施选址问题。它选择的设施在存在竞争设施的情况下达到指定的目标市场份额。重力模型概念用于确定分配给每个设施的需求比例。选择达到指定目标市场份额所需的最小设施数量。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Location-Allocation Problem Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _loc_alloc_problem_type_value _loc_alloc_problem_type { get; set; } = _loc_alloc_problem_type_value._MINIMIZE_IMPEDANCE;

        public enum _loc_alloc_problem_type_value
        {
            /// <summary>
            /// <para>Minimize impedance</para>
            /// <para>Minimize impedance—This option solves the warehouse location problem. It selects a set of facilities such that the total sum of weighted impedances (demand at a location times the impedance to the closest facility) is minimized. This problem type is often known as the P-Median problem.</para>
            /// <para>最小化阻抗 （Minimize impedance） - 此选项可解决仓库位置问题。它选择一组设施，使加权阻抗的总和（某个位置的需求乘以最近设施的阻抗）最小化。此问题类型通常称为 P-中位数问题。</para>
            /// </summary>
            [Description("Minimize impedance")]
            [GPEnumValue("MINIMIZE_IMPEDANCE")]
            _MINIMIZE_IMPEDANCE,

            /// <summary>
            /// <para>Maximize coverage</para>
            /// <para>Maximize coverage—This option solves the fire station location problem. It chooses facilities such that all or the greatest amount of demand is within a specified impedance cutoff.</para>
            /// <para>最大化覆盖范围 - 此选项可解决消防站位置问题。它选择的设施使所有或最大需求量都在指定的阻抗截止范围内。</para>
            /// </summary>
            [Description("Maximize coverage")]
            [GPEnumValue("MAXIMIZE_COVERAGE")]
            _MAXIMIZE_COVERAGE,

            /// <summary>
            /// <para>Maximize capacitated coverage</para>
            /// <para>Maximize capacitated coverage—This option solves the location problem where facilities have a finite capacity. It chooses facilities such that all or the greatest amount of demand can be served without exceeding the capacity of any facility. In addition to honoring capacity, it selects facilities such that the total sum of weighted impedance (demand allocated to a facility multiplied by the impedance to or from the facility) is minimized.</para>
            /// <para>最大化容量覆盖范围 - 此选项可解决设施容量有限的位置问题。它选择的设施可以在不超过任何设施容量的情况下满足所有或最大需求。除了尊重容量外，它还选择设施，使加权阻抗的总和（分配给设施的需求乘以设施的阻抗乘以设施的阻抗）最小化。</para>
            /// </summary>
            [Description("Maximize capacitated coverage")]
            [GPEnumValue("MAXIMIZE_CAPACITATED_COVERAGE")]
            _MAXIMIZE_CAPACITATED_COVERAGE,

            /// <summary>
            /// <para>Minimize facilities</para>
            /// <para>Minimize facilities—This option solves the fire station location problem. It chooses the minimum number of facilities needed to cover all or the greatest amount of demand within a specified impedance cutoff.</para>
            /// <para>最小化设施点 - 此选项可解决消防站位置问题。它选择在指定阻抗截止范围内满足所有或最大需求所需的最小设施数量。</para>
            /// </summary>
            [Description("Minimize facilities")]
            [GPEnumValue("MINIMIZE_FACILITIES")]
            _MINIMIZE_FACILITIES,

            /// <summary>
            /// <para>Maximize attendance</para>
            /// <para>Maximize attendance—This option solves the neighborhood store location problem where the proportion of demand allocated to the nearest chosen facility falls with increasing distance. The set of facilities that maximize the total allocated demand is chosen. Demand further than the specified impedance cutoff does not affect the chosen set of facilities.</para>
            /// <para>最大化出勤率 - 此选项解决了邻里商店位置问题，即分配给最近所选设施点的需求比例随着距离的增加而下降。选择使总分配需求最大化的设施集。超过指定阻抗截止值的需求不会影响所选的设施组。</para>
            /// </summary>
            [Description("Maximize attendance")]
            [GPEnumValue("MAXIMIZE_ATTENDANCE")]
            _MAXIMIZE_ATTENDANCE,

            /// <summary>
            /// <para>Maximize market share</para>
            /// <para>Maximize market share—This option solves the competitive facility location problem. It chooses facilities to maximize market share in the presence of competitive facilities. Gravity model concepts are used to determine the proportion of demand allocated to each facility. The set of facilities that maximizes the total allocated demand is chosen.</para>
            /// <para>最大化市场份额 - 此选项解决了竞争激烈的设施选址问题。它选择的设施是在存在竞争设施的情况下最大限度地提高市场份额。重力模型概念用于确定分配给每个设施的需求比例。选择使总分配需求最大化的设施集。</para>
            /// </summary>
            [Description("Maximize market share")]
            [GPEnumValue("MAXIMIZE_MARKET_SHARE")]
            _MAXIMIZE_MARKET_SHARE,

            /// <summary>
            /// <para>Target market share</para>
            /// <para>Target market share—This option solves the competitive facility location problem. It chooses facilities to reach a specified target market share in the presence of competitive facilities. Gravity model concepts are used to determine the proportion of demand allocated to each facility. The minimum number of facilities needed to reach the specified target market share is chosen.</para>
            /// <para>目标市场份额 - 此选项解决了竞争性设施选址问题。它选择的设施在存在竞争设施的情况下达到指定的目标市场份额。重力模型概念用于确定分配给每个设施的需求比例。选择达到指定目标市场份额所需的最小设施数量。</para>
            /// </summary>
            [Description("Target market share")]
            [GPEnumValue("TARGET_MARKET_SHARE")]
            _TARGET_MARKET_SHARE,

        }

        /// <summary>
        /// <para>Number of Facilities to Find</para>
        /// <para><xdoc>
        ///   <para>Specifies the number of facilities that the solver should locate.</para>
        ///   <para>The facilities with a FacilityType value of Required are always part of the solution when there are more facilities to find than required facilities; any excess facilities to choose are picked from candidate facilities.</para>
        ///   <para>Any facilities that have a FacilityType value of Chosen before solving are treated as candidate facilities at solve time.</para>
        ///   <para>The parameter value is not considered for the Minimize facilities problem type since the solver determines the minimum number of facilities to locate to maximize coverage.</para>
        ///   <para>The parameter value is overridden for the Target market share problem type because the solver searches for the minimum number of facilities required to capture the specified market share.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定求解器应定位的设施点数。</para>
        ///   <para>当要查找的设施点多于所需设施点时，FacilityType 值为 Required 的设施点始终是解决方案的一部分;任何要选择的多余设施都是从候选设施中挑选的。</para>
        ///   <para>在求解前 FacilityType 值为 Chosen 的任何设施点在求解时都被视为候选设施点。</para>
        ///   <para>最小化设施点问题类型不考虑参数值，因为求解器会确定要定位的最小设施点数以最大化覆盖范围。</para>
        ///   <para>对于目标市场份额问题类型，参数值将被覆盖，因为求解器会搜索捕获指定市场份额所需的最小设施点数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Facilities to Find")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _number_facilities_to_find { get; set; } = 1;


        /// <summary>
        /// <para>Impedance Cutoff</para>
        /// <para><xdoc>
        ///   <para>Impedance Cutoff specifies the maximum impedance at which a demand point can be allocated to a facility. The maximum impedance is measured by the least-cost path along the network. If a demand point is outside the cutoff, it is left unallocated. This property might be used to model the maximum distance that people are willing to travel to visit your stores or the maximum time that is permitted for a fire department to reach anyone in the community.</para>
        ///   <para>Demand points have a Cutoff_[Impedance] property, which, if set, overrides the Impedance Cutoff property of the analysis layer. You might find that people in rural areas are willing to travel up to 10 miles to reach a facility, while urbanites are only willing to travel up to 2 miles. You can model this behavior by setting the impedance cutoff value of the analysis layer to 10 and setting the Cutoff_Miles value of the demand points in urban areas to 2.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>阻抗截止指定可将需求点分配给设施点的最大阻抗。最大阻抗由网络上的最低成本路径测量。如果需求点在截止点之外，则该需求点将处于未分配状态。此属性可用于模拟人们愿意前往访问您的商店的最大距离，或者消防部门允许接触社区中任何人的最长时间。</para>
        ///   <para>请求点具有 Cutoff_[Impedance] 属性，如果设置该属性，则将覆盖分析层的阻抗截止属性。您可能会发现，农村地区的人们愿意走 10 英里才能到达设施，而城市人只愿意走 2 英里。可以通过将分析图层的阻抗截止值设置为 10 并将城市区域中需求点的Cutoff_Miles值设置为 2 来对此行为进行建模。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Impedance Cutoff")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _impedance_cutoff { get; set; } = null;


        /// <summary>
        /// <para>Impedance Transformation</para>
        /// <para><xdoc>
        ///   <para>This sets the equation for transforming the network cost between facilities and demand points. This property, coupled with the Impedance Parameter, specifies how severely the network impedance between facilities and demand points influences the solver's choice of facilities.</para>
        ///   <bulletList>
        ///     <bullet_item>Linear—The transformed network impedance between the facility and the demand point is the same as the shortest-path network impedance between them. With this option, the impedance parameter is always set to one. This is the default.</bullet_item><para/>
        ///     <bullet_item>Power—The transformed network impedance between the facility and the demand point is equal to the shortest-path network impedance raised to the power specified by the impedance parameter. Use this option with a positive impedance parameter to specify higher weight to nearby facilities.</bullet_item><para/>
        ///     <bullet_item>Exponential—The transformed network impedance between the facility and the demand point is equal to the mathematical constant e raised to the power specified by the shortest-path network impedance multiplied with the impedance parameter. Use this option with a positive impedance parameter to specify a very high weight to nearby facilities.Exponential transformations are commonly used in conjunction with an impedance cutoff.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Demand points have an ImpedanceTransformation property, which, if set, overrides the Impedance Transformation property of the analysis layer. You might determine the impedance transformation should be different for urban and rural residents. You can model this by setting the impedance transformation for the analysis layer to match that of rural residents and setting the impedance transformation for the demand points in urban areas to match that of urbanites.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>这为转换设施和需求点之间的网络成本设定了方程式。此属性与阻抗参数相结合，用于指定设施点和请求点之间的网络阻抗对求解器选择设施点的影响程度。</para>
        ///   <bulletList>
        ///     <bullet_item>线性 — 设施点和请求点之间的变换网络阻抗与它们之间的最短路径网络阻抗相同。使用此选项时，阻抗参数始终设置为 1。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>功率 — 设施点和请求点之间的变换网络阻抗等于提升到阻抗参数指定的功率的最短路径网络阻抗。将此选项与正阻抗参数一起使用，可为附近设施指定更高的权重。</bullet_item><para/>
        ///     <bullet_item>指数 - 设施点和需求点之间的变换网络阻抗等于数学常数 e 提高到由最短路径网络阻抗乘以阻抗参数指定的功率。将此选项与正阻抗参数一起使用，以指定附近设施的非常高的权重。指数变换通常与阻抗截止结合使用。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>请求点具有 ImpedanceTransformation 属性，如果设置该属性，则将覆盖分析图层的 Impedance Transformation 属性。您可以确定城乡居民的阻抗变换应该不同。您可以通过设置分析图层的阻抗变换以匹配农村居民的阻抗变换，并将城市地区需求点的阻抗变换设置为与城市居民的阻抗变换相匹配来对此进行建模。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Impedance Transformation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _impedance_transformation_value _impedance_transformation { get; set; } = _impedance_transformation_value._LINEAR;

        public enum _impedance_transformation_value
        {
            /// <summary>
            /// <para>Linear</para>
            /// <para>Linear—The transformed network impedance between the facility and the demand point is the same as the shortest-path network impedance between them. With this option, the impedance parameter is always set to one. This is the default.</para>
            /// <para>线性 — 设施点和请求点之间的变换网络阻抗与它们之间的最短路径网络阻抗相同。使用此选项时，阻抗参数始终设置为 1。这是默认设置。</para>
            /// </summary>
            [Description("Linear")]
            [GPEnumValue("LINEAR")]
            _LINEAR,

            /// <summary>
            /// <para>Power</para>
            /// <para>Power—The transformed network impedance between the facility and the demand point is equal to the shortest-path network impedance raised to the power specified by the impedance parameter. Use this option with a positive impedance parameter to specify higher weight to nearby facilities.</para>
            /// <para>功率 — 设施点和请求点之间的变换网络阻抗等于提升到阻抗参数指定的功率的最短路径网络阻抗。将此选项与正阻抗参数一起使用，可为附近设施指定更高的权重。</para>
            /// </summary>
            [Description("Power")]
            [GPEnumValue("POWER")]
            _POWER,

            /// <summary>
            /// <para>Exponential</para>
            /// <para>Exponential—The transformed network impedance between the facility and the demand point is equal to the mathematical constant e raised to the power specified by the shortest-path network impedance multiplied with the impedance parameter. Use this option with a positive impedance parameter to specify a very high weight to nearby facilities.Exponential transformations are commonly used in conjunction with an impedance cutoff.</para>
            /// <para>指数 - 设施点和需求点之间的变换网络阻抗等于数学常数 e 提高到由最短路径网络阻抗乘以阻抗参数指定的功率。将此选项与正阻抗参数一起使用，以指定附近设施的非常高的权重。指数变换通常与阻抗截止结合使用。</para>
            /// </summary>
            [Description("Exponential")]
            [GPEnumValue("EXPONENTIAL")]
            _EXPONENTIAL,

        }

        /// <summary>
        /// <para>Impedance Parameter</para>
        /// <para><xdoc>
        ///   <para>Provides a parameter value to the equations specified in the Impedance transformation parameter. The parameter value is ignored when the impedance transformation is of type Linear. For Power and Exponential impedance transformations, the value should be nonzero.</para>
        ///   <para>Demand points have an ImpedanceParameter property, which, if set, overrides the Impedance Parameter property of the analysis layer. You might determine that the impedance parameter should be different for urban and rural residents. You can model this by setting the impedance transformation for the analysis layer to match that of rural residents and setting the impedance transformation for the demand points in urban areas to match that of urbanites.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>为阻抗变换参数中指定的方程提供参数值。当阻抗变换类型为 Linear 时，将忽略参数值。对于功率和指数阻抗变换，该值应为非零。</para>
        ///   <para>请求点具有 ImpedanceParameter 属性，如果设置该属性，则将覆盖分析图层的 Impedance Parameter 属性。您可以确定城乡居民的阻抗参数应该不同。您可以通过设置分析图层的阻抗变换以匹配农村居民的阻抗变换，并将城市地区需求点的阻抗变换设置为与城市居民的阻抗变换相匹配来对此进行建模。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Impedance Parameter")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _impedance_parameter { get; set; } = 1;


        /// <summary>
        /// <para>Target Market Share</para>
        /// <para>Specifies the target market share in percentage to solve for when the Location-Allocation Problem Type parameter is set to Target market share. It is the percentage of the total demand weight that you want your solution facilities to capture. The solver chooses the minimum number of facilities required to capture the target market share specified by this numeric value.</para>
        /// <para>指定当“位置分配问题类型”参数设置为“目标市场份额”时要求解的目标市场份额（以百分比表示）。它是您希望解决方案设施捕获的总需求权重的百分比。求解器选择捕获此数值指定的目标市场份额所需的最小设施数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Market Share")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _target_market_share { get; set; } = 10;


        /// <summary>
        /// <para>Accumulators</para>
        /// <para><xdoc>
        ///   <para>A list of cost attributes to be accumulated during analysis. These accumulation attributes are for reference only; the solver only uses the cost attribute specified by the Impedance Attribute parameter to calculate the route.</para>
        ///   <para>For each cost attribute that is accumulated, a Total_[Impedance] property is added to the routes that are output by the solver.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在分析期间要累积的成本属性列表。这些累积属性仅供参考;求解器仅使用阻抗属性参数指定的成本属性来计算路由。</para>
        ///   <para>对于累积的每个成本属性，都会将 Total_[Impedance] 属性添加到求解器输出的路径中。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Accumulators")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _accumulate_attribute_name { get; set; } = null;


        /// <summary>
        /// <para>U-Turn Policy</para>
        /// <para><xdoc>
        ///   <para>Specifies the U-turn policy that will be used at junctions. Allowing U-turns implies that the solver can turn around at a junction and double back on the same street. Given that junctions represent street intersections and dead ends, different vehicles may be able to turn around at some junctions but not at others—it depends on whether the junction represents an intersection or a dead end. To accommodate this, the U-turn policy parameter is implicitly specified by the number of edges that connect to the junction, which is known as junction valency. The acceptable values for this parameter are listed below; each is followed by a description of its meaning in terms of junction valency.</para>
        ///   <bulletList>
        ///     <bullet_item>Allowed—U-turns are permitted at junctions with any number of connected edges. This is the default value.</bullet_item><para/>
        ///     <bullet_item>Not allowed—U-turns are prohibited at all junctions, regardless of junction valency. However, U-turns are still permitted at network locations even when this setting is chosen, but you can set the individual network location's CurbApproach property to prohibit U-turns there as well.</bullet_item><para/>
        ///     <bullet_item>Allowed at dead ends only—U-turns are prohibited at all junctions, except those that have only one adjacent edge (a dead end).</bullet_item><para/>
        ///     <bullet_item>Allowed at dead ends and intersections only—U-turns are prohibited at junctions where exactly two adjacent edges meet but are permitted at intersections (junctions with three or more adjacent edges) and dead ends (junctions with exactly one adjacent edge). Often, networks have extraneous junctions in the middle of road segments. This option prevents vehicles from making U-turns at these locations.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>If you need a more precisely defined U-turn policy, consider adding a global turn delay evaluator to a network cost attribute or adjusting its settings if one exists, and pay particular attention to the configuration of reverse turns. You can also set the CurbApproach property of your network locations.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在交汇点使用的 U 形转弯策略。允许掉头意味着求解器可以在交叉路口掉头，并在同一条街道上折返。鉴于交叉路口代表街道交叉路口和死胡同，不同的车辆可能在某些交叉路口掉头，但在其他交叉路口则不能掉头——这取决于交叉路口是代表交叉路口还是死胡同。为了适应这种情况，U 形转弯策略参数由连接到交汇点的边数隐式指定，这称为交汇点化合价。下面列出了此参数的可接受值;每个之后都描述了其在结化合价方面的含义。</para>
        ///   <bulletList>
        ///     <bullet_item>允许 - 允许在具有任意数量连接边的交汇处进行 U 形转弯。这是默认值。</bullet_item><para/>
        ///     <bullet_item>不允许 - 无论交汇点化合价如何，所有交汇点都禁止掉头。但是，即使选择此设置，仍允许在网络位置掉头，但您可以设置单个网络位置的 CurbApproach 属性以禁止掉头。</bullet_item><para/>
        ///     <bullet_item>仅允许在死胡同处 - 所有交汇点都禁止掉头，但只有一个相邻边（死胡同）的交汇点除外。</bullet_item><para/>
        ///     <bullet_item>仅允许在死角和交叉点处 - 在两条相邻边恰好相交的交汇处禁止掉头，但在交叉点（具有三个或更多相邻边的交汇点）和死端（恰好具有一条相邻边的交汇点）允许掉头。通常，网络在路段中间有无关的交叉路口。此选项可防止车辆在这些位置掉头。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果需要更精确地定义掉头策略，请考虑将全局转弯延迟评估器添加到网络成本属性或调整其设置（如果存在），并特别注意倒车转弯的配置。还可以设置网络位置的 CurbApproach 属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("U-Turn Policy")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _UTurn_policy_value _UTurn_policy { get; set; } = _UTurn_policy_value._ALLOW_UTURNS;

        public enum _UTurn_policy_value
        {
            /// <summary>
            /// <para>Allowed</para>
            /// <para>Allowed—U-turns are permitted at junctions with any number of connected edges. This is the default value.</para>
            /// <para>允许 - 允许在具有任意数量连接边的交汇处进行 U 形转弯。这是默认值。</para>
            /// </summary>
            [Description("Allowed")]
            [GPEnumValue("ALLOW_UTURNS")]
            _ALLOW_UTURNS,

            /// <summary>
            /// <para>Not allowed</para>
            /// <para>Not allowed—U-turns are prohibited at all junctions, regardless of junction valency. However, U-turns are still permitted at network locations even when this setting is chosen, but you can set the individual network location's CurbApproach property to prohibit U-turns there as well.</para>
            /// <para>不允许 - 无论交汇点化合价如何，所有交汇点都禁止掉头。但是，即使选择此设置，仍允许在网络位置掉头，但您可以设置单个网络位置的 CurbApproach 属性以禁止掉头。</para>
            /// </summary>
            [Description("Not allowed")]
            [GPEnumValue("NO_UTURNS")]
            _NO_UTURNS,

            /// <summary>
            /// <para>Allowed at dead ends only</para>
            /// <para>Allowed at dead ends only—U-turns are prohibited at all junctions, except those that have only one adjacent edge (a dead end).</para>
            /// <para>仅允许在死胡同处 - 所有交汇点都禁止掉头，但只有一个相邻边（死胡同）的交汇点除外。</para>
            /// </summary>
            [Description("Allowed at dead ends only")]
            [GPEnumValue("ALLOW_DEAD_ENDS_ONLY")]
            _ALLOW_DEAD_ENDS_ONLY,

            /// <summary>
            /// <para>Allowed at dead ends and intersections only</para>
            /// <para>Allowed at dead ends and intersections only—U-turns are prohibited at junctions where exactly two adjacent edges meet but are permitted at intersections (junctions with three or more adjacent edges) and dead ends (junctions with exactly one adjacent edge). Often, networks have extraneous junctions in the middle of road segments. This option prevents vehicles from making U-turns at these locations.</para>
            /// <para>仅允许在死角和交叉点处 - 在两条相邻边恰好相交的交汇处禁止掉头，但在交叉点（具有三个或更多相邻边的交汇点）和死端（恰好具有一条相邻边的交汇点）允许掉头。通常，网络在路段中间有无关的交叉路口。此选项可防止车辆在这些位置掉头。</para>
            /// </summary>
            [Description("Allowed at dead ends and intersections only")]
            [GPEnumValue("ALLOW_DEAD_ENDS_AND_INTERSECTIONS_ONLY")]
            _ALLOW_DEAD_ENDS_AND_INTERSECTIONS_ONLY,

        }

        /// <summary>
        /// <para>Restrictions</para>
        /// <para>A list of restriction attributes to be applied during the analysis.</para>
        /// <para>在分析期间要应用的限制属性列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Restrictions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _restriction_attribute_name { get; set; } = null;


        /// <summary>
        /// <para>Use Hierarchy in Analysis</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Checked—The hierarchy attribute will be used for the analysis. Using a hierarchy results in the solver preferring higher-order edges to lower-order edges. Hierarchical solves are faster, and they can be used to simulate the preference of a driver who chooses to travel on freeways rather than local roads when possible—even if that means a longer trip. This option is active only if the input network dataset has a hierarchy attribute.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The hierarchy attribute will not be used for the analysis. If hierarchy is not used, the result is an exact route for the network dataset.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The parameter is inactive if a hierarchy attribute is not defined on the network dataset used to perform the analysis.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>选中 - 层次结构属性将用于分析。使用层次结构会导致求解器优先选择高阶边而不是低阶边。分层求解速度更快，并且可用于模拟驾驶员的偏好，如果可能的话，他们选择在高速公路上行驶而不是在本地道路上行驶，即使这意味着更长的行程。仅当输入网络数据集具有层次结构属性时，此选项才处于活动状态。</bullet_item><para/>
        ///     <bullet_item>未选中 - 等级属性将不用于分析。如果未使用层次结构，则结果是网络数据集的精确路径。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果未在用于执行分析的网络数据集上定义层次结构属性，则该参数处于非活动状态。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Hierarchy in Analysis")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _hierarchy_value? _hierarchy { get; set; } = null;

        public enum _hierarchy_value
        {
            /// <summary>
            /// <para>USE_HIERARCHY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_HIERARCHY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_HIERARCHY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_HIERARCHY")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Path Shape</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>No lines—No shape will be generated for the output of the analysis.</bullet_item><para/>
        ///     <bullet_item>Straight lines—The output line shapes will be straight lines connecting the solution facilities to their allocated demand points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>无线 - 不会为分析输出生成任何形状。</bullet_item><para/>
        ///     <bullet_item>直线—输出线形状将是将解决方案设施点连接到其分配的请求点的直线。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Path Shape")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _output_path_shape_value _output_path_shape { get; set; } = _output_path_shape_value._STRAIGHT_LINES;

        public enum _output_path_shape_value
        {
            /// <summary>
            /// <para>No lines</para>
            /// <para>No lines—No shape will be generated for the output of the analysis.</para>
            /// <para>无线 - 不会为分析输出生成任何形状。</para>
            /// </summary>
            [Description("No lines")]
            [GPEnumValue("NO_LINES")]
            _NO_LINES,

            /// <summary>
            /// <para>Straight lines</para>
            /// <para>Straight lines—The output line shapes will be straight lines connecting the solution facilities to their allocated demand points.</para>
            /// <para>直线—输出线形状将是将解决方案设施点连接到其分配的请求点的直线。</para>
            /// </summary>
            [Description("Straight lines")]
            [GPEnumValue("STRAIGHT_LINES")]
            _STRAIGHT_LINES,

        }

        /// <summary>
        /// <para>Default Capacity</para>
        /// <para><xdoc>
        ///   <para>Specifies the default capacity of facilities when the Location-Allocation Problem Type parameter is set to Maximize capacitated coverage. This parameter is ignored for all other problem types.</para>
        ///   <para>Facilities have a Capacity property, which, if set to a nonnull value, overrides the Default Capacity parameter for that facility.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将位置分配问题类型参数设置为最大化容量覆盖范围时设施点的默认容量。对于所有其他问题类型，将忽略此参数。</para>
        ///   <para>设施点具有 Capacity 属性，如果设置为非空值，则该属性将覆盖该设施点的默认容量参数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Default Capacity")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _default_capacity { get; set; } = 1;


        /// <summary>
        /// <para>Start Time</para>
        /// <para><xdoc>
        ///   <para>Indicates the time and date of departure. The departure time can be from facilities or demand points, depending on whether travel is from demand to facility or facility to demand.</para>
        ///   <para>If you have chosen a traffic-based impedance attribute, the solution will be generated given dynamic traffic conditions at the time of day specified here. A date and time can be specified as 5/14/2012 10:30 AM.</para>
        ///   <para>Instead of using a particular date, a day of the week can be specified using the following dates:
        ///   <bulletList>
        ///     <bullet_item>Today—12/30/1899  </bullet_item><para/>
        ///     <bullet_item>Sunday—12/31/1899  </bullet_item><para/>
        ///     <bullet_item>Monday—1/1/1900  </bullet_item><para/>
        ///     <bullet_item>Tuesday—1/2/1900  </bullet_item><para/>
        ///     <bullet_item>Wednesday—1/3/1900  </bullet_item><para/>
        ///     <bullet_item>Thursday—1/4/1900  </bullet_item><para/>
        ///     <bullet_item>Friday—1/5/1900  </bullet_item><para/>
        ///     <bullet_item>Saturday—1/6/1900  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示出发的时间和日期。出发时间可以是从设施点或需求点出发，具体取决于旅行是从需求到设施还是从设施到需求。</para>
        ///   <para>如果选择了基于流量的阻抗属性，则将在此处指定的一天中的时间根据动态流量条件生成解决方案。日期和时间可以指定为 2012 年 5 月 14 日上午 10：30。</para>
        /// 可以使用<para>以下日期指定星期几，而不是使用特定日期：
        ///   <bulletList>
        ///     <bullet_item>今天 - 1899 年 12 月 30 日</bullet_item><para/>
        ///     <bullet_item>星期日—1899年12月31日</bullet_item><para/>
        ///     <bullet_item>星期一 - 1/1/1900</bullet_item><para/>
        ///     <bullet_item>星期二 - 1/2/1900</bullet_item><para/>
        ///     <bullet_item>星期三 - 1/3/1900</bullet_item><para/>
        ///     <bullet_item>星期四—1/4/1900</bullet_item><para/>
        ///     <bullet_item>星期五 - 1/5/1900</bullet_item><para/>
        ///     <bullet_item>星期六 - 1/6/1900</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Start Time")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_of_day { get; set; } = null;


        /// <summary>
        /// <para>Network Analyst Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Analyst Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_layer { get; set; }


        public MakeLocationAllocationLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}